home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10424 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: String Question
  5. Date: Sun, 17 Mar 96 16:50:09 GMT
  6. Organization: none
  7. Message-ID: <827081409snz@genesis.demon.co.uk>
  8. References: <DoBt0E.4A9@freenet.carleton.ca> <4ievgg$qcg@garden.csc.calpoly.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4ievgg$qcg@garden.csc.calpoly.edu>
  15.            dstubbs@garden.csc.calpoly.edu "Dan Stubbs" writes:
  16.  
  17. >In article <DoBt0E.4A9@freenet.carleton.ca>,
  18. >Jerry Boyd <aq436@FreeNet.Carleton.CA> wrote:
  19. >>
  20. >> 
  21. >>How would I write a function to remove a specified
  22. >>number of characters from a string and store it in an array.
  23. >>For instance, extracting three characters from a string, starting
  24. >>from the 5th character.
  25.  
  26. What is supposed to happen if the source string is less than 8 characters
  27. long or is this guaranteed not to occur? Is the source string to be left
  28. untouched (i.e. the substring just copied) or is it to be closed i.e. the
  29. substring to be really removed (the question indicates this but there
  30. is some room for doubt). The first step to solve a problem is to specify it
  31. fully.
  32.  
  33. >>
  34. >>
  35. >
  36. >void remove (char A[], char B[], int p, int q, int n) {
  37.  
  38. It is probably best not to try to redefine a standard library function! :-)
  39.  
  40. -- 
  41. -----------------------------------------
  42. Lawrence Kirby | fred@genesis.demon.co.uk
  43. Wilts, England | 70734.126@compuserve.com
  44. -----------------------------------------
  45.